﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Generic/Brushes.xaml" />
        <ResourceDictionary Source="Converters.xaml" />
        <ResourceDictionary Source="Generic/PromptWindowStyle.xaml" />
        <ResourceDictionary Source="Icons.xaml" />
        <ResourceDictionary Source="Generic/ButtonStyles.xaml" />
        <ResourceDictionary Source="Generic/ScrollbarTheme.xaml" />
        <ResourceDictionary Source="Generic/ComboboxTheme.xaml" />
        <ResourceDictionary Source="Generic/TextboxTheme.xaml" />
        <ResourceDictionary Source="Generic/DatagridTheme.xaml" />
        <ResourceDictionary Source="Generic/BusyIndicatorStyle.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="style_mainwindow" TargetType="Window">
        <Setter Property="AllowsTransparency" Value="True" />
        <Setter Property="WindowStyle" Value="None" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="FontFamily" Value="Microsoft Yahei UI" />
    </Style>

    <Style x:Key="style_mainnavi_item" TargetType="ListBoxItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid>
                        <Border Background="{DynamicResource COLOR_LIGHTGRAY}"
                                BorderBrush="{StaticResource COLOR_DARKGRAY}"
                                BorderThickness="1,1,1,0"
                                Visibility="{Binding IsSelected,
                                                     Converter={StaticResource BooleanToVisibilityConverter},
                                                     RelativeSource={RelativeSource TemplatedParent}}" />
                        <Grid Background="Wheat" Opacity="0" />
                        <Label Margin="24,6"
                               Content="{Binding Value.Title}"
                               Foreground="{TemplateBinding Foreground}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Foreground" Value="OrangeRed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>